package com.wushi.lenovo.asia5b.app_model.good.orderitem;

import android.content.Context;
import android.graphics.Color;
import android.support.v4.content.ContextCompat;

import com.mvp.base.model.BaseModel;
import com.wushi.lenovo.asia5b.R;
import com.wushi.lenovo.asia5b.app_model.good.goodbean.OrderGoodBean;

import java.util.List;

/**
 * Created by zhangyuncai on 2019/1/23.
 */
public class OrderItemModel extends BaseModel {

    /**
     * order_id : 50
     * order_no : SO5B180000020
     * order_datetime : {"date":"2018-11-05 16:32:13.000000","timezone_type":3,"timezone":"Asia/Kuala_Lumpur"}
     * order_parcel : [{"id":61,"product_id":167,"product_name":"2018夏季新款字母短袖T恤+宽松显瘦休闲裤德芙裤运动裤九分裤时尚套装两件套女","image":"https://s11.mogucdn.com/mlcdn/c45406/180428_382177fi446686lejjk8laa8i8acd_640x850.jpg","quantity":3,"weight":"6.60","price":"RM 106.64","diff_price":"RM 0.00","diff_domestic":"RM 2.48","kgorm3":"kg","is_sensitive":0,"status_name":"已付款","remark":"","action":[],"attr_name":"蓝色T恤,XL "}]
     */

    private int order_id;
    private String order_no;
    private String order_date;
    private String order_count_text;
    private String order_status_name;
    private String order_status_color;
    private String order_image;//第一张图片
    private String order_sub_total;//不带单位订单商品总价
    private int order_pay_type;
    private List<OrderGoodBean> order_parcel;
    private List<OrderGoodBean.ActionBean> order_action;

    public String getOrder_sub_total() {
        return order_sub_total;
    }

    public int getOrder_status_color(Context context) {
        int color;
        try {
            color = Color.parseColor(order_status_color);
        } catch (Exception e) {
            e.printStackTrace();
            color = ContextCompat.getColor(context, R.color.colorPrimaryDark);
        }
        return color;
    }

    public String getOrder_status_name() {
        return order_status_name;
    }

    public String getOrder_count_text() {
        return order_count_text;
    }

    public String getOrder_image() {
        return order_image;
    }

    public List<OrderGoodBean.ActionBean> getOrder_action() {
        return order_action;
    }

    public String getOrder_date() {
        return order_date;
    }

    public int getOrder_id() {
        return order_id;
    }

    public String getOrder_no() {
        return order_no;
    }


    public List<OrderGoodBean> getOrder_parcel() {
        return order_parcel;
    }

}

/*
 "order_id": 42206,
 "order_no": "SO5B190025090",
 "order_date": "2019-09-04",
 "order_sub_total": 5.96,
 "order_pay_type": 2,
 */